/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.hutech09.jsale.entity;

import java.io.Serializable;

public class ProductDetailId implements Serializable {

    private Long infoType;

    private Long product;

    public ProductDetailId() {
    }

    public ProductDetailId(Long infoType, Long product) {
        this.infoType = infoType;
        this.product = product;
    }

    public Long getInfoType() {
        return infoType;
    }

    public void setInfoType(Long infoType) {
        this.infoType = infoType;
    }

    public Long getProduct() {
        return product;
    }

    public void setProduct(Long product) {
        this.product = product;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        if (infoType != null) {
            hash += infoType.hashCode();
        }
        if (product != null) {
            hash += product.hashCode();
        }
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof ProductDetailId)) {
            return false;
        }
        ProductDetailId id = (ProductDetailId) obj;
        if (infoType == id.infoType && product == id.product) {
            return true;
        }
        return false;
    }

    @Override
    public String toString() {
        return String.format("ProductDetailId[%s, %s]", infoType.toString(), product.toString());
    }
}
